<!DOCTYPE html>
<html lang="en">

<head>
	<title>Mock Platfrom</title>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
	<link rel="stylesheet" href="css/fullcalendar.css" />
	<link rel="stylesheet" href="css/maruti-style.css" />
	<link rel="stylesheet" href="css/maruti-media.css" class="skin-color" />
	<link href="css/chosen.css" rel="stylesheet">
	
	<script src="js/excanvas.min.js"></script> 
	<script src="js/jquery.min.js"></script> 
	<script src="js/jquery.ui.custom.js"></script> 
	<script src="js/bootstrap.min.js"></script> 
	<script src="js/jquery.flot.min.js"></script> 
	<script src="js/jquery.flot.resize.min.js"></script> 
	<script src="js/jquery.peity.min.js"></script> 
	<script src="js/fullcalendar.min.js"></script> 
	<script src="js/chosen.jquery.js"></script>


	<script src="js/platform.mould.js"></script> 
	<script type="text/javascript">
		//初始化界面
		var tmp;
		$(document).ready(ready );

		//设置分组名称列表.
	</script>
	
</head>
<body>

<!--Header-part-->
<div id="header">
  <h3 style="color: #FF3300;">&nbsp;Mock Platfrom</h3>
</div>
<!--close-Header-part--> 

<!--close-top-Header-menu-->

<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-home"></i> 首页</a>
  <ul>
    <li class="active"><a href="index.html"><i class="icon icon-home"></i> <span>首页</span></a></li>
    <li> <a href="mould.html"><i class="icon icon-signal"></i> <span>业务类型管理</span></a> </li>
  	  <li> <a href="content.html"><i class="icon icon-inbox"></i> <span>动态数据管理</span></a> </li>
  	 <li> <a href="json.html"><i class="icon icon-text-width"></i> <span>json解析</span></a> </li>
  </ul>
</div>

<div id="content">
  <div id="content-header">
    <div id="breadcrumb"> <a href="index.html" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
    <a href="mould.html" class="current">业务类型管理</a>
    </div>
    <h1>业务类型</h1>
    
   <!--  <div>
    	<textarea id="json_input" style="width: 400px;height: 100px;"></textarea>
    </div> -->
  </div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        
        <div class="widget-box">
          <div class="widget-title" > <span class="icon"> <i class="icon-th"></i> </span>
           <span style="font-weight : bold;">&nbsp;业务属性:&nbsp;</span>
            <select id="port_type" class="chosen-select">
            	<option value="1">http</option>
            	<option value="2">https</option>
            	<option value="3">scoket</option>
            </select>
             <span style="font-weight : bold;">&nbsp;业务类型:&nbsp;</span>
            <select id="mould_type" class="chosen-select">
            	<option value="1">http同步类型</option>
            	<option value="2">http异步类型</option>
            </select>
            <span  style="width: 100px;background: blue;" class="label btn btn-info btn-mini"><a href="#t_insert" data-toggle="modal" style="color: white;" onclick="insertM()">新建</a></span>
          </div>
          <div class="widget-content nopadding">
            <table id="list" class="table table-bordered table-striped" style="table-layout:fixed;">
              <thead>
                <tr>
                  <th style="max-width: 100px;">ID</th>
                  <th style="max-width: 300px;">业务名称</th>
                  <th style="max-width: 300px;">URL</th>
                  <th style="max-width: 300px;">操作</th>
                </tr>
              </thead>
              <tbody>
                <tr class="even gradeC">
                  <td style="max-width: 100px;">1</td>
                  <td style="max-width: 300px;">test</td>
                  <td style="max-width: 300px;">test</td>
                  <td style="max-width: 300px;">
                  	<a href="#t_edit" data-toggle="modal" class="btn btn-primary btn-mini">修改</a>
                  	<a href="#t_del" class="btn btn-danger btn-mini">删除</a> 
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
  </div>
<div class="row-fluid">
      <div id="footer" class="span12"> 2016 &copy; Mock Platfrom</div>
    </div>
    		<!-- 新建窗口 -->
			<div id="t_insert" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>新建业务信息</h3>
              </div>
              <div class="modal-body">
              		<div>业务属性:&nbsp;
              	  	<select id="t_port_type" class="chosen-select">
              	  		<option value="1">http</option>
	            		<option value="2">https</option>
	            		<option value="3">scoket</option>
	            	</select>
	              </div>
	              <br>
              	  <div>业务类型:&nbsp;
              	  	<select id="t_mould_type" class="chosen-select">
              	  		<option value="1">同步类型</option>
	            		<option value="2">异步类型</option>
	            	</select>
	              </div>
	              <br>
	              <div id="insert_html">
		              <div>业务名称:&nbsp;<input style="width: 400px;" type="text"  id="t_insert_serviceName"/></div>
		              <div>URL名称:&nbsp;<input style="width: 400px;" type="text"  id="t_insert_url" value="http://10.59.33.49:8080/MockPlatform/Synchronous/"/></div>
		              <div>业务模板:&nbsp;<textarea style="width: 400px;height: 200px;" id="t_insert_mould"></textarea></div>
	              </div>
	              
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" id ="insertMould" onclick="insertSynchronousMould()">新建</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
    
    		<!-- 同步修改窗口 -->
			<div id="t_edit" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>同步信息修改</h3>
              </div>
              <div class="modal-body">
              <input hidden="hidden" id="t_id">
	              <div>业务名称:&nbsp;<input style="width: 400px;" type="text"  id="t_serviceName"/></div>
	              <div id="encrypt">加密方式:&nbsp;<!-- <input style="width: 400px;" type="text"  id="t_encrypt"/> -->
	              	<select id="t_encrypt" >
	              		<option value="1">RSA参数加密</option>
	              		<option value="2">RSA全加密</option>
	              		<option value="3">MD5参数加密</option>
	              	</select>
	              </div>
	              <div>返回格式:&nbsp;
	              	<select id="t_format" >
	              		<option value="xml">xml</option>
	              		<option value="json">json</option>
	              	</select>
	              </div>
	              <div>响应URL:&nbsp;<input style="width: 400px;" type="text"  id="t_url"/></div>
	               <div>业务模板:&nbsp;<textarea style="width: 400px;height: 200px;" id="t_mould"></textarea></div>
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" id="t_update_onclick" onclick="updateSynchronousMould()" >修改</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
            
            
            
            <!-- Scoket修改窗口 -->
			<div id="s_edit" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>Scoket信息修改</h3>
              </div>
              <div class="modal-body">
              <input hidden="hidden" id="s_id">
	              <div>业务名称:&nbsp;<input style="width: 400px;" type="text"  id="s_serverName"/></div>
	              <div>业务接口:&nbsp;<input style="width: 400px;" type="text"  id="s_url"/></div>
	              <div>业务端口:&nbsp;<input style="width: 400px;" type="text"  id="s_port"/></div>
	              <div>业务报文:&nbsp;<textarea style="width: 400px;height: 200px;" id="s_mould"></textarea></div>
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" onclick="updateScoketMould()" >修改</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
            
            
            <!-- 异步修改窗口 -->
			<div id="y_edit" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>异步信息修改</h3>
              </div>
              <div class="modal-body">
              <input hidden="hidden" id="y_id">
                	<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;业务名称:&nbsp;<input style="width: 400px;" type="text"  id="y_serviceName"/></div>
	             	<div>第一次响应URL:&nbsp;<input style="width: 400px;" type="text"  id="y_responseUrl"/></div>
	               	<div>第一次响应模板:&nbsp;<textarea style="width: 400px;height: 100px;" id="y_responseMould"></textarea></div>
	               	<div>第二次响应URL:&nbsp;<input style="width: 400px;" type="text"  id="y_receiptUrl"/></div>
	               	<div>第二次响应模板:&nbsp;<textarea style="width: 400px;height: 100px;" id="y_receiptMould"></textarea></div>
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" id="y_update_onclick" onclick="updateAsynchronousMould()">修改</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
            
            <!-- 同步删除窗口 -->
            <div id="t_del" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>同步信息删除</h3>
              </div>
              <div class="modal-body">
              <input hidden="hidden" id="t_del_id">
                <p>是否确认删除此业务信息？</p>
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" id="t_del_onclick" onclick="delSynchronousMould()">确认</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
            
            
             <!-- 异步删除窗口 -->
            <div id="y_del" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>异步信息删除</h3>
              </div>
              <div class="modal-body">
              <input hidden="hidden" id="y_del_id">
                <p>是否确认删除此业务信息？</p>
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" id="y_del_onclick" onclick="delAsynchronousMould()">确认</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
            
            
            <!-- Scoket删除窗口 -->
            <div id="s_del" class="modal hide" aria-hidden="true" style="display: none;">
              <div class="modal-header">
                <button data-dismiss="modal" class="close" type="button">×</button>
                <h3>Scoket信息删除</h3>
              </div>
              <div class="modal-body">
              <input hidden="hidden" id="s_del_id">
                <p>是否确认删除此业务信息？</p>
              </div>
              <div class="modal-footer">
               <a class="btn btn-primary" onclick="delScoketMould()">确认</a>
               <a data-dismiss="modal" class="btn" href="#">取消</a>
              </div>
            </div>
            
</body>

</html>
